home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
windows
/
editprog
/
newvisda.arj
/
DATABOX.FRM
< prev
next >
Wrap
Text File
|
1993-04-28
|
5KB
|
216 lines
VERSION 2.00
Begin Form fDataBox
BackColor = &H00C0C0C0&
ClientHeight = 2790
ClientLeft = 4185
ClientTop = 2715
ClientWidth = 3645
Height = 3195
Left = 4125
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2790
ScaleWidth = 3645
Top = 2370
Width = 3765
Begin ListBox cData
BackColor = &H00FFFFFF&
Height = 2370
Left = 50
TabIndex = 0
Tag = "OL"
Top = 50
Width = 3495
End
End
Option Explicit
Sub cData_DblClick ()
On Error GoTo SetErr
Dim nv As String, prop As String
Dim fds As dynaset
Dim ind As Index
Dim fld As field
Dim tbl As Table
If cData = "" Then Exit Sub
prop = Mid(cData, 1, InStr(cData, " =") - 1)
nv = InputBox("Enter New Value for " + prop)
If nv = "" Then Exit Sub
Select Case tag
Case "DB"
Select Case cData.ListIndex
Case 0
gCurrentDB.Name = nv
Case 1
gCurrentDB.Connect = nv
Case 2
gCurrentDB.CollatingOrder = nv
Case 3
gCurrentDB.Updatable = nv
Case 4
gCurrentDB.Transactions = nv
Case 5
gCurrentDB.QueryTimeout = nv
End Select
Case "TBD"
Select Case cData.ListIndex
Case 1
gCurrentDB.TableDefs(fTables.cTableList).Name = nv
Case 2
gCurrentDB.TableDefs(fTables.cTableList).DateCreated = nv
Case 3
gCurrentDB.TableDefs(fTables.cTableList).LastUpdated = nv
Case 4
gCurrentDB.TableDefs(fTables.cTableList).Updatable = nv
Case 5
gCurrentDB.TableDefs(fTables.cTableList).Connect = nv
Case 6
gCurrentDB.TableDefs(fTables.cTableList).SourceTableName = nv
Case 7
gCurrentDB.TableDefs(fTables.cTableList).Attributes = nv
End Select
Case "QD"
Select Case cData.ListIndex
Case 1
gCurrentQueryDef.Name = nv
Case 2
gCurrentQueryDef.SQL = nv
End Select
Case "DS"
Set fds = gCurrentDS
Select Case cData.ListIndex
Case 0
fds.Name = nv
Case 1
fds.BOF = nv
Case 2
fds.Bookmark = nv
Case 3
fds.Bookmarkable = nv
Case 4
fds.EOF = nv
Case 5
fds.Filter = nv
Case 6
fds.LastModified = nv
Case 7
fds.LockEdits = nv
Case 8
fds.NoMatch = nv
Case 9
fds.Sort = nv
Case 10
fds.Transactions = nv
Case 11
fds.RecordCount = nv
Case 12
fds.Updatable = nv
End Select
Case "TBL"
Set tbl = gCurrentTbl
Select Case cData.ListIndex
Case 0
tbl.Name = nv
Case 1
tbl.BOF = nv
Case 2
tbl.Bookmark = nv
Case 3
tbl.Bookmarkable = nv
Case 4
tbl.DateCreated = nv
Case 5
tbl.EOF = nv
Case 6
tbl.Index = nv
Case 7
tbl.LastModified = nv
Case 8
tbl.LastUpdated = nv
Case 9
tbl.LockEdits = nv
Case 10
tbl.NoMatch = nv
Case 11
tbl.Transactions = nv
Case 12
tbl.RecordCount = nv
Case 13
tbl.Updatable = nv
End Select
Case "FLD"
Set fld = gCurrentField
Select Case cData.ListIndex
Case 0
fld.Name = nv
Case 1
fld.Type = nv
Case 2
fld.Size = nv
Case 3
fld.SourceField = nv
Case 4
fld.SourceTable = nv
Case 5
fld.CollatingOrder = nv
Case 6
fld.Attributes = nv
Case 7
fld.OrdinalPosition = nv
End Select
Case "IND"
Set ind = gCurrentIndex
Select Case cData.ListIndex
Case 0
ind.Name = nv
Case 1
ind.Fields = nv
Case 2
ind.Unique = nv
Case 3
ind.Primary = nv
End Select
End Select
GoTo SetEnd
SetErr:
ShowError
Resume SetEnd
SetEnd:
End Sub
Sub cData_KeyPress (KeyAscii As Integer)
If KeyAscii = 27 Then Unload Me
End Sub
Sub Form_Load ()
Height = 3000
Width = 3000
Left = (Screen.Width - Width) / 2
Top = (Screen.Height - Height) / 2
End Sub
Sub Form_Paint ()
Outlines Me
End Sub
Sub Form_Resize ()
On Error Resume Next
'resize the list box
cData.Width = Me.Width - 240
cData.Height = Me.Height - 500
End Sub